package unint3_1;

public class printer {
}package jx1.unit3.clazz.override;

/**
 * Created by MadFrog on 2017/10/17.
 */
public class Printer {

    /**
     * overload重载
     * 返回值、方法名相同，
     * 参数列表不同（数据类型、数量、顺序）
     */
    public static void print(String str){
        System.out.println("String=" + str);
    }

    public static void print(int i){
        System.out.println("int=" + i);
    }

    public static void print(float f){
        System.out.println("float=" + f);
    }

    public static void main(String[] args) {
        print(123.00f);
        print(123);
        print("123");
    }
}
